const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('parallel_project', {
    ID: {
      type: DataTypes.STRING(50),
      allowNull: false,
      primaryKey: true,
      comment: "主键"
    },
    PROJECT_ID: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "项目编号"
    },
    PROJECT_NAME: {
      type: DataTypes.STRING(200),
      allowNull: true,
      comment: "项目名称"
    },
    TOTAL_INVESTMENT: {
      type: DataTypes.DECIMAL(16,5),
      allowNull: true,
      comment: "总投资额单位：万元"
    },
    INVESTMENT_SOURCE: {
      type: DataTypes.STRING(5),
      allowNull: true,
      comment: "投资来源【字典INVESTMENT_SOURCE】0政府；1企业\t"
    },
    REGION: {
      type: DataTypes.STRING(20),
      allowNull: true,
      comment: "行政区划【字典REGION】（不固定，项目自己配置）\t"
    },
    REGION_CODE: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "区划代码"
    },
    REGION_NAME: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "区划名称"
    },
    UNIT_ADDRESS: {
      type: DataTypes.TEXT,
      allowNull: true,
      comment: "建设地址"
    },
    CERTIFICATE_TYPE: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "证件类型"
    },
    CERTIFICATE_NUMBER: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "证件号码"
    },
    PROJECT_TYPE: {
      type: DataTypes.STRING(10),
      allowNull: true,
      comment: "项目类型"
    },
    PLACE_CODE: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "建设地点（（跨区、跨境、境外、省内））"
    },
    CONSTRUCTION_UNIT: {
      type: DataTypes.STRING(200),
      allowNull: true
    },
    PROJECT_CATEGORY: {
      type: DataTypes.STRING(5),
      allowNull: true
    },
    APPLY_TIME: {
      type: DataTypes.DATEONLY,
      allowNull: true,
      comment: "录入时间"
    },
    CONTACT_MAN: {
      type: DataTypes.STRING(20),
      allowNull: true,
      comment: "联系人"
    },
    CONTACTS: {
      type: DataTypes.STRING(20),
      allowNull: true
    },
    INDUSTRY: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "国标行业"
    },
    INDUSTRY_NAME: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "国标行业名称"
    },
    FOREIGN_ABROAD_FLAG: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "是否外商投资\/境外投资 0是否 1是外商投资 2是境外投资"
    },
    THE_INDUSTRY: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "所属行业"
    },
    THE_INDUSTRY_NAME: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "所属行业名称"
    },
    CONSTRUCT_PER: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "建设性质"
    },
    isconpermit: {
      type: DataTypes.STRING(10),
      allowNull: true
    },
    isbid: {
      type: DataTypes.STRING(10),
      allowNull: true
    },
    iszaj: {
      type: DataTypes.STRING(10),
      allowNull: true
    }
  }, {
    sequelize,
    tableName: 'parallel_project',
    timestamps: false
  });
};
